package top.guoyang.zuoye.service.impl;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.guoyang.zuoye.base.R;
import top.guoyang.zuoye.dao.TbCpuDAO;
import top.guoyang.zuoye.entity.TbCpu;
import top.guoyang.zuoye.service.TbCpuService;

@Service
@RequiredArgsConstructor
@Slf4j
public class TbCpuServiceImpl implements TbCpuService {
    private final TbCpuDAO tbCpuDAO;

    @Override
    public R<String> insert(TbCpu tbCpu){
        int i = tbCpuDAO.insert(tbCpu);
        return i == 1 ? R.ok("添加成功",null) : R.fail("添加失败",null);
    }
}
